// old Auth.ts    拼接：params  不拼接：data
import myaxios from '@/utils/instance'
class Api {
	/**
 *  获取首页信息
 *  @url /app/mini/index/index-content_new
 *  @method get
 */
	GetindexContent_API = async () => {
		const res = await myaxios({
			method: 'get',
			url: '/app/mini/index/index-content_new',

		})
		return res.data
	}
	/**
 *  获取客服
 *  @url /app/mini/customer-service-info

 *  @method post
 */
	GetcustomerService_API = async () => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/customer-service-info',

		})
		return res.data
	}
	/**
 *  获取相关信息
 *  @url /app/mini/my/aboutus

 *  @method post
 */
	Getaboutus_API = async () => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/my/aboutus',

		})
		return res.data
	}

	/**
 *  获取二维码
 *  @url /app/mini/qrcode/get

 *  @method get
 */
	Getqrcode_API = async () => {
		const res = await myaxios({
			method: 'get',
			url: '/app/mini/qrcode/get',

		})
		return res.data
	}

		/**
 *  获取下载app二维码
 *  @url /app/mini/qrcode/get-download

 *  @method get
 */
		Getdownload_API = async () => {
			const res = await myaxios({
				method: 'get',
				url: '/app/mini/qrcode/get-download',
	
			})
			return res.data
		}
		/**
 *  获取友情链接
 *  @url /app/mini/blogroll/get

 *  @method get
 */
		Getblogroll_API = async () => {
			const res = await myaxios({
				method: 'get',
				url: '/app/mini/blogroll/get',
	
			})
			return res.data
		}

	/**
	 *  查看我的收藏列表
	 *  @url /app/mini/course/myFavList
	 *  @method post
	 */
	GetMyFavList_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/myFavList',
			data
		})
		return res.data
	}
	/**
	 *  收藏
	 *  @url /app/mini/courseCollect/fav
	 *  @method post
	 */
	CourseCollectfav_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/courseCollect/fav',
			data
		})
		return res.data
	}
	/**
	 *  取消收藏
	 *  @url /app/mini/courseCollect/cancelFav
	 *  @method post
	 */
	CourseCollectCancelFav_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/courseCollect/cancelFav',
			data
		})
		return res.data
	}
	/**
	 *  我的学习时长统计
	 *  @url /app/mini/course/myLearnCount
	 *  @method post
	 */
	MyLearnCount_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/myLearnCount',
			data
		})
		return res.data
	}
	/**
	 *  获取我的学习记录
	 *  @url /app/mini/course/my-list
	 *  @method post
	 */
	MyCourseList_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/my-list',
			data
		})
		return res.data
	}
	/**
	 *  获取课程列表
	 *  @url /app/mini/course/list
	 *  @method post
	 */
	GetCourseList_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/list',
			data
		})
		return res.data
	}
	/**
	 *  获取课程分类
	 *  @url /app/mini/course/classification
	 *  @method post
	 */
	GetClassfincation_API = async () => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/classification',
		})
		return res.data
	}

	/**
 *  通过课程id获取课程详情
 *  @url /app/mini/course/detail
 *  @method post
 */
	Getdetail_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/course/detail',
			data
		})
		return res.data
	}
	/**
	 *  根据小节获取详情
	 *  @url /app/mini/course/get-item?itemId=2777
	 *  @method post
	 */
	GetCourseItem_API = async (data?: any) => {
		const res = await myaxios({
			method: 'get',
			url: `/app/mini/course/get-item?itemId=${data.itemId}`,
		})
		return res.data
	}
	/**
	*  根据类别查询列表
	*  @url /app/mini/course/get-category-list
	*  @method get
	*/
	GetCategofyList_API = async (params?: {}) => {
		const res = await myaxios({
			method: 'get',
			url: '/app/mini/course/get-category-list',
			params
		})
		return res.data
	}

/**
	*  根据类别查询列表-分页
	*  @url /app/mini/course/get-category-page
	*  @method get
	*/
	GetCategofyPage_API = async (params?: {}) => {
		const res = await myaxios({
			method: 'get',
			url: '/app/mini/course/get-category-page',
			params
		})
		return res.data
	}

	/**
	*  查询热搜榜
	*  @url /app/mini/hot/getHotSearchList
	*  @method post
	*/
	GetHotSearchList_API = async (data?: {}) => {
		const res = await myaxios({
			method: 'post',
			url: '/app/mini/hot/getHotSearchList',
			data
		})
		return res.data
	}

}
export default new Api()